﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Managistics.Model.Mappings
{
    public class CatalogMap : ClassMap<Catalog>
    {

        public CatalogMap()
        {
            Schema(Constants._tblSchema);
            Table(Constants._tblCatalog);
            LazyLoad();

            Id(x => x.Id).GeneratedBy.Assigned().Column("CATALOG_ID");

            Map(x => x.Name).Column("CATALOG_NAME").Not.Nullable().Length(50);
            Map(x => x.Description).Column("DESCRIPTION_CATALOG").Length(200);
        }
    }
}
